package moon.excel.template;

public class TplChange {
	/** 引起变化的原key */
	private String sourceKey;
	private int oldFirstRow;
	private int oldLastRow;
	private int oldFirstColumn;
	private int oldLastColumn;
	private int newFirstRow;
	private int newLastRow;
	private int newFirstColumn;
	private int newLastColumn;

	public TplChange() {
	}

	public TplChange(TplGroupDescribe cd) {
		this.sourceKey = cd.getKey();
		this.oldFirstRow = cd.getFirstRow();
		this.oldLastRow = cd.getLastRow();
		this.oldFirstColumn = cd.getFirstColumn();
		this.oldLastColumn = cd.getLastColumn();
		this.newFirstRow = cd.getFirstRow();
		this.newLastRow = cd.getLastRow();
		this.newFirstColumn = cd.getFirstColumn();
		this.newLastColumn = cd.getLastColumn();
	}

	public int getOldFirstRow() {
		return oldFirstRow;
	}

	public void setOldFirstRow(int oldFirstRow) {
		this.oldFirstRow = oldFirstRow;
	}

	public int getOldLastRow() {
		return oldLastRow;
	}

	public void setOldLastRow(int oldLastRow) {
		this.oldLastRow = oldLastRow;
	}

	public int getOldFirstColumn() {
		return oldFirstColumn;
	}

	public void setOldFirstColumn(int oldFirstColumn) {
		this.oldFirstColumn = oldFirstColumn;
	}

	public int getOldLastColumn() {
		return oldLastColumn;
	}

	public void setOldLastColumn(int oldLastColumn) {
		this.oldLastColumn = oldLastColumn;
	}

	public int getNewFirstRow() {
		return newFirstRow;
	}

	public void setNewFirstRow(int newFirstRow) {
		this.newFirstRow = newFirstRow;
	}

	public int getNewLastRow() {
		return newLastRow;
	}

	public void setNewLastRow(int newLastRow) {
		this.newLastRow = newLastRow;
	}

	public int getNewFirstColumn() {
		return newFirstColumn;
	}

	public void setNewFirstColumn(int newFirstColumn) {
		this.newFirstColumn = newFirstColumn;
	}

	public int getNewLastColumn() {
		return newLastColumn;
	}

	public void setNewLastColumn(int newLastColumn) {
		this.newLastColumn = newLastColumn;
	}

	public String getSourceKey() {
		return sourceKey;
	}

	public void setSourceKey(String sourceKey) {
		this.sourceKey = sourceKey;
	}

	public boolean isValid() {
		return oldFirstRow != newFirstRow || oldLastRow != newLastRow || oldFirstColumn != newFirstColumn || oldLastColumn != newLastColumn;
	}

}
